package com.zgm.ch06.aop.aspectJ.pointCut._2_1_2;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;

@Aspect
public class PointcutDemoAspect {

	@Around("SystemPointcuts.testBeanExecution()")
	public Object log(ProceedingJoinPoint pjp ) throws Throwable {
		System.out.println("前");
		Object ret = pjp.proceed();
		System.out.println("后");
		
		return ret;
	}
	
	@Around("SystemPointcuts.fromTestBeanExecution()")
	public Object inTestBean(ProceedingJoinPoint pjp) throws Throwable {
		System.out.println("In test Bean");
		Object ret = pjp.proceed();
		System.out.println("<<<<");
		
		return ret;
	}
}
